package com.jason.java.lib.sort;

/**
 * Description:MaoPaoFa
 *
 * @author 陈宝阳
 * @create 2020/9/15 18:39
 */
public class MaoPaoFa {

  public static void main(String args[]){
    int []nums ={21,23,65,34,97};
    for (int i = 0; i < nums.length-1; i++) {
      for (int j = 0; j < nums.length-i-1; j++) {
        if (nums[j]<nums[j+1]) {
          int temp = nums[j];
          nums[j] = nums[j+1];
          nums[j+1] = temp;
        }
      }
    }
    for (int i = 0; i < nums.length; i++) {
      System.out.print(nums[i]+",");
    }
  }
}
